#include <iostream>
using namespace std;
/* C语言的枚举 */
enum Result
{
    LOG_SUCCESS = 1,    //单独赋值会改变之后的值
    LOG_FAILED,
    REG_SUCCESS = 4,
    REG_FAILED
};

//#define LOG_SUCCESS 0

int main()
{
    enum Result ret = LOG_SUCCESS;    //枚举变量只能定义成枚举值
    int pret = REG_FAILED;
    cout<<ret<<endl;
    return 0;
}
//不同枚举有相同的枚举值名称时，C语言只会在编译区报错，C++ 直接报错